/**
 * 通用接口定义
 */
import req from "/@/api/req";

export const Api = {
  upload: "common/upload",
  download: "common/download",
};

//文件上传接口
export function uploadReq(url: string, data: FormData) {
  return req.commonPutResponse(url, data);
}

//导出通用接口
export async function exportReq(url: string, params: any) {
  return (await req.getResponse(
    {
      url,
      responseType: "blob",
      params,
    },
    {
      useGlobalLoading: false,
    }
  )) as Blob;
}
